<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //数组交集
    var arr=[1,2,3,4,5,6,7,8]
    var brr=[4,5,6,9]
    var jiaoji=arr.filter((v)=>{
       return  brr.indexOf(v)>-1
    })
    console.log(jiaoji)
   var s= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].reduce((sum, number) => {
//    console.log(sum,number)

   return sum + number;
 }, 0) // -> 55
 console.log(s)
</script>
</html>